1. Field of the Invention
The present invention relates generally to the field of graphical programming languages, and more particularly, to a library of function calls that allow a graphical programming language user function to be callable by other software applications.
2. Related Art
In textual languages such as C, PASCAL, or BASIC, one programs using keywords following rules of syntax. In graphical languages, one connects icons together using a mouse to generate a program resembling a data flow diagram. Hewlett Packard Visual Engineering Environment (HP VEE) for Windows is a graphical programming language (GPL) designed for test and measurement applications.
In a GPL, one programs by selecting objects (icons) from menus, placing those objects within a working area environment, and connecting them together using a mouse. The lines connecting the objects carry data or control signals.
In many areas customers are content to have the GPL be the central piece of software in their test systems. While GPLs may call routines written in other languages, such as PASCAL, C, or FORTRAN, the GPL is still the controlling software in the integrated system. However, in many cases customers want the reverse, a GPL that is callable from other software. Hewlett Packard (HP) currently supports the ability for HP VEE to call user functions remotely, but does not support the reverse, that is, being able to call HP VEE from other software.
The present invention is directed towards a graphical programming language (GPL) that is callable from other software languages, such as PASCAL, C, or FORTRAN. The present invention allows user functions from a GPL to be called, much like a procedure from one textual language is called by a second textual language. The present invention uses a client/server configuration to allow GPL user functions to be callable from other software applications. The client is a library of xe2x80x98Cxe2x80x99 procedure calls. The GPL server is the service. Thus, GPL user functions can be called by any application that can link in the xe2x80x98Cxe2x80x99 library.
The present invention allows the client to exist on a separate machine from the GPL service or on the same machine in the presence of a multitasking operating system. When the client exists on a separate machine, the client and the server can communicate via various network communication protocols, such as Inter-Process Communication (IPC) based on TCP/IP protocols. IPC based on TCP/IP protocols is well known to a person skilled in the relevant art. A Berkeley socket application programmer interface (API) is written on top of TCP/IP. A further description of a Berkeley socket API is found in the above cross-referenced patent application titled, xe2x80x9cA To/From Socket Objectxe2x80x9d; U.S. patent application Ser. No. 08/581,123, now abandoned.
The xe2x80x98Cxe2x80x99 library consists of two separate application programmer interfaces (APIs). The first API instantiates the GPL environment, loads in user functions, and executes the user functions. Since GPLs are interpreted languages and are not compiled, a GPL environment must be instantiated and present to load in libraries and execute user functions.
When a xe2x80x98Cxe2x80x99 library procedure call invokes a GPL user function, the arguments of the call correspond to the input and output terminals on the user function. The data being sent to the GPL user function is the input data. The data being returned from the GPL user function is the result of the execution of the GPL user function. The data of the arguments and the results are GPL data types, known as containers. A container is a complex data type that encapsulates all information about the data. When calling a GPL user function from xe2x80x98Cxe2x80x99 code it is necessary to encapsulate the primitive data types in xe2x80x98Cxe2x80x99 into GPL containers. Conversely, when receiving results back from a GPL function call, it is necessary to remove the primitive type from the container so that the xe2x80x98Cxe2x80x99 code may use the data. The second API in the xe2x80x98Cxe2x80x99 library builds and unbuilds these containers.
The GPL user function executes in the GPL server, which is a separate process. The GPL user function can be executed in one of two modes, a normal execution mode or a debug execution mode. The normal execution mode allows the GPL user function to execute in a normal fashion, i.e., execution without being able to view the user function. The debug execution mode allows the user to view the user function in a debug window. At the beginning of execution an implicit break point is set on the user function. The user can set breakpoints within the user function and then step into the function using the step button or the continue button. The user can then proceed through the entire function until execution has stopped. At the end of execution, the debug window will disappear.
The present invention can ideally be run on different, heterogeneous machines, such as a PC running WIN95 and a SUN workstation, or it can be run on the same machine. This client/server model for linking in GPL user functions allows for a high level of concurrence and distribution as well as heterogeneity.